package com.qiaoas.springbootconfig3;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class indexController {
    @Autowired
    private UserConfig userConfig;
    @Autowired
    private TestConfig testConfig;

    @RequestMapping("/")
    String index(){
        return "Hello Spring Boot Config 3";
    }

    @RequestMapping("getuser")
    String getUser(){
        return userConfig.getName();
    }

    @RequestMapping("gettest")
    String getTest(){
        return testConfig.getName();
    }

}
